package com.hskn.hss.task.ienum;

public enum WeekUtil {
    MON("星期一", "1"),
    TUE("星期二", "2"),
    WED("星期三", "3"),
    THU("星期四", "4"),
    FRI("星期五", "5"),
    SAT("星期六", "6"),
    SUN("星期日", "7");

    private final String name;
    private final String index;

    //构造方法
    private WeekUtil(String name, String index) {
        this.name = name;
        this.index = index;
    }

    //普通方法
    public static String RemindWeek(String index) {
        for (WeekUtil c : WeekUtil.values()) {
            if (c.getIndex().equals(index)) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public String getIndex() {
        return index;
    }
}
